home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 February: Tool Chest / Dev.CD Feb 94.toast / New System Software Extensions / QuickDraw™ GX v1.0ß2 / Sample Code / Printing Samples / Extensions… / Additions Source / InitializeMessage.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-31  |  1.5 KB  |  88 lines  |  [TEXT/MPS ]

  1. /* ------------------------------------------------------------------------------
  2.  
  3.     FILENAME
  4.         InitializeMessage.c
  5.  
  6.     DESCRIPTION
  7.         This file contains the message procedure that will be invoked when the Printing Manager
  8.         issues the Initialize message.
  9.  
  10.     COPYRIGHT
  11.         Copyright Apple Computer, Inc. 1991
  12.         All rights reserved. 
  13.     
  14.     INTERFACE ROUTINES
  15.         InitializeMessageProc
  16.  
  17.     MODIFICATION HISTORY
  18.         12/03/91            Sam Weiss                Initial Implementation
  19.  
  20.  
  21. ------------------------------------------------------------------------------- */
  22.  
  23.  
  24. #include <Types.h>
  25. #include <Quickdraw.h>
  26. #include <Memory.h>
  27. #include <Resources.h>
  28. #include <Dialogs.h>
  29. #include <TextEdit.h>
  30. #include <OSUtils.h>
  31. #include <Packages.h>
  32. #include <ToolUtils.h>
  33. #include <Menus.h>
  34. #include <String.h>
  35. #include <Strings.h>
  36. #include <Printing.h>
  37. #include <FixMath.h>
  38.  
  39. #include <graphics routines.h>
  40.  
  41. #include <Collections.h>
  42. #include <Messages.h>
  43.  
  44. #include    <PrintingManager.h>
  45. #include    <PrintingMessages.h>
  46.  
  47. #include    <Additions.h>
  48.  
  49.  
  50. extern long A5Size (void);
  51. extern void A5Init (void *);
  52.  
  53.  
  54. // Globals...
  55.  
  56.  
  57. gxShape gSerialShape;
  58.  
  59.  
  60. //------------------------------------------------------------------------------------
  61.  
  62. /*
  63.     Name:                    InitializeMessageProc
  64.     
  65.     Description:        Initialize the universal driver.
  66.  
  67.     Parameters:            long:                unused context
  68.     
  69.     Returns:                OSErr
  70.     
  71.     Preconditions:        none
  72.                                 
  73.     Postconditions:    none
  74.     
  75. */
  76.  
  77. OSErr InitializeMessageProc (void) {
  78.  
  79.     OSErr anErr;
  80.     
  81.     anErr = NewMessageGlobals(A5Size(), A5Init);
  82.     
  83.     if (!anErr)
  84.         gSerialShape = NULL;
  85.     
  86.     return anErr;
  87. }
  88.